package org.bdware.doip.implementation;


import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.Tokenizer;

public class CNAnalyzer extends Analyzer {
    private boolean useSmart;
    public boolean useSmart() {
        return this.useSmart;
    }
    public void setUseSmart(boolean useSmart) {
        this.useSmart = useSmart;
    }
    public CNAnalyzer() {
        this(false);
    }

    @Override
    protected TokenStreamComponents createComponents(String fieldName) {
        Tokenizer _IKTokenizer = new CNTokenizer(this.useSmart());
        return new TokenStreamComponents(_IKTokenizer);
    }

    public CNAnalyzer(boolean useSmart) {
        super();
        this.useSmart = useSmart;
    }

}
